//
//  ViewController.m
//  喜玛朗玛
//
//  Created by song on 15/1/8.
//  Copyright (c) 2015年 song. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
@property (weak, nonatomic) IBOutlet UIButton *lastbtn;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    int maxH = CGRectGetMaxY(self.lastbtn.frame)+ 10;

    self.scrollView.contentSize = CGSizeMake(0, maxH);
    
    self.scrollView.contentInset  = UIEdgeInsetsMake(64, 0, 0, 0); //增加额外的 滚动区域。拖动之后松手停留位置
    
    // 设置一开始滚动的位置
    self.scrollView.contentOffset = CGPointMake(0, -64);
    
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
